<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../../../layui/css/layui.css" media="all">
</head>
<body class="layui-view-body">
<div class="layui-content">
    <div class="layui-row">
        <div class="layui-card">
            <div class="layui-card-header" id="pageTitle">游戏资讯发布页</div>
            <div class="layui-form-item">
                <label class="layui-form-label">标题:</label>
                <div class="layui-input-block">
                    <input  class="layui-input" type="text" name="infoTitle" id="infoTitle" value="" placeholder="请输入文章标题" autocomplete="off">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">标题:</label>
                <div class="layui-input-block">
                    <textarea id="infoContent" lay-verify="content" name = "text"></textarea>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script src="../../../layui/lay/modules/jquery-3.3.1.js"></script>
<script src="../../../layui/jquery.cookie.js"></script>
<script src="../../../layui/layui.js"></script>
<script src="../../html_js/utf.js"></script>
<script>
    layui.use(['layedit', 'form'], function(){
        var form = layui.form;
        var layedit = layui.layedit;
        layedit.set({	//设置图片接口
            uploadImage: {
                url: 'layEdit/upload', //接口url
                type: 'post'
            }
        });
        //创建一个编辑器，lay_edit为textarea标签的id值
        var index = layedit.build('infoContent',{
            hideTool:['image']
            ,height: 350    //设置编辑器的高度
        });
        //提交时把值同步到文本域中
        form.verify({
            //content富文本域中的lay-verify值
            content: function(value) {
                return layedit.sync(index);
            }
        });
    });
</script>
</html>